{include file="header_with_login.tpl"}
{include file="tabs.tpl"}

{* begin rows *}
{assign var="row1" value="<tr>"}
{assign var="row2" value="<tr>"}
{assign var="row3" value="<tr>"}
{assign var="row4" value="<tr>"}

{assign var="row5" value="<tr>"}
{assign var="row6" value="<tr>"}
{assign var="row7" value="<tr>"}
{assign var="row8" value="<tr>"}

{section name=index loop=$media}

	{* row 1 - the image *}
	{concat var="row1" value='<td width="20%">'}
	{concat var="row1" value='<a href="/media/view/url/'}
	{concat var="row1" value=$media[index].url}
	{concat var="row1" value='">'}
	{concat var="row1" value='<img src="'}
	{concat var="row1" value=$media[index].thumb_url}
	{concat var="row1" value='" /></a>'}
	{concat var="row1" value='</td>'}
			
	{* row 2 - the title *}
	{concat var="row2" value='<td width="20%">'}
	{concat var="row2" value=$media[index].title}
	{concat var="row2" value='</td>'}

	{* row 3 - the user name *}
	{concat var="row3" value='<td width="20%">'}
	{concat var="row3" value='Posted by:  '}
	{concat var="row3" value=$media[index].username}
	{concat var="row3" value='</td>'}

	{* row 4 - the comment count *}
	{concat var="row4" value='<td width="20%">'}
	{concat var="row4" value='<a href="#">Comments ('}
	{concat var="row4" value=$media[index].comments}
	{concat var="row4" value=')</a>'}
	{concat var="row4" value='</td>'}

{/section}

{section name=index loop=$media}
	{* row 5 - second row - the image *}
	{concat var="row5" value='<td width="20%">'}
	{concat var="row5" value='<a href="/media/view/url/'}
	{concat var="row5" value=$media[index].url}
	{concat var="row5" value='">'}
	{concat var="row5" value='<img src="'}
	{concat var="row5" value=$media[index].thumb_url}
	{concat var="row5" value='" /></a>'}
	{concat var="row5" value='</td>'}
			
	{* row 6 - second row - the title *}
	{concat var="row6" value='<td width="20%">'}
	{concat var="row6" value=$media[index].title}
	{concat var="row6" value='</td>'}

	{* row 7 - second row - the user name *}
	{concat var="row7" value='<td width="20%">'}
	{concat var="row7" value='Posted by:  '}
	{concat var="row7" value=$media[index].username}
	{concat var="row7" value='</td>'}

	{* row 8 - second row - the comment count *}
	{concat var="row8" value='<td width="20%">'}
	{concat var="row8" value='<a href="#">Comments ('}
	{concat var="row8" value=$media[index].comments}
	{concat var="row8" value=')</a>'}
	{concat var="row8" value='</td>'}
{/section}

{* end rows *}
{concat var="row1" value="</tr>"}
{concat var="row2" value="</tr>"}
{concat var="row3" value="</tr>"}
{concat var="row4" value="</tr>"}

{concat var="row5" value="</tr>"}
{concat var="row6" value="</tr>"}
{concat var="row7" value="</tr>"}
{concat var="row8" value="</tr>"}

<div id="main" class="main">
	<div id="centertablewrapper" class="centertablewrapper">
		<table width="100%" style="text-align:left">
			{$row1}
			{$row2}
			{$row3}
			{$row4}

			{$row5}
			{$row6}
			{$row7}
			{$row8}
		</table>
	</div>
</div>

{include file="footer.tpl"}
